import Vue from 'vue'
import Router from 'vue-router'






Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/404',
      component: resolve => require(['@/404.vue'], resolve)
    },
    {
      path: '*',
      redirect: { path: '/404' }
    },
    {
      path: '/',
      name: 'indexpage',
      component: function (resolve) {
        require(['@/components/index/Index'], resolve)
      },
    },
    {
      path: '/login',
      name: 'login',
      component: function (resolve) {
        require(['@/components/Login'], resolve)
      },
    },
    {
      path: '/forget',
      name: 'forget',
      component: function (resolve) {
        require(['@/components/Forget'], resolve)
      },
    },

    {
      path: '/sign',
      name: 'sign',
      component: function (resolve) {
        require(['@/components/Sign'], resolve)
      },
    },
    {
      path: '/filtercar',
      name: 'filtercar',
      component: function (resolve) {
        require(['@/components/car/FilterCar'], resolve)
      },
    },
    {
      path: '/category',
      name: 'category',
      component: function (resolve) {
        require(['@/components/car/Category'], resolve)
      },
    },
    {
      path: '/productlist',
      name: 'productlist',
      component: function (resolve) {
        require(['@/components/product/ProductList'], resolve)
      },
    }, 
    {
      path: '/productcar',
      name: 'productcar',
      component: function (resolve) {
        require(['@/components/product/ProductCar'], resolve)
      },
    },
    
    {
      path: '/productdetail',
      name: 'productdetail',
      component: function (resolve) {
        require(['@/components/product/ProductDetail'], resolve)
      },
    },
    {
      path: '/liDetail',
      name: 'liDetail',
      component: function (resolve) {
        require(['@/components/product/liDetail'], resolve)
      },
    },
    {
      path: '/settle',
      name: 'settle',
      component: function (resolve) {
        require(['@/components/product/Settle'], resolve)
      },
    },

    {
      path: '/querycar',
      name: 'querycar',
      component: function (resolve) {
        require(['@/components/car/QueryCar'], resolve)
      },
    },
    {
    	path: '/record',
      name: 'record',
      component: function (resolve) {
        require(['@/components/record/record'], resolve)
      },
    },
    // 施工数据列表
    {
    	path: '/construction',
      name: 'construction',
      component: function (resolve) {
        require(['@/components/construction/construction'], resolve)
      },
    },
    // 添加施工数据 construction-list
    {
    	path: '/construction-list',
      name: 'construction-list',
      component: function (resolve) {
        require(['@/components/construction-list/construction-list'], resolve)
      }
    },
    // 养护数量列表
    {
    	path: '/tenance_list',
      name: 'tenance_list',
      component: function (resolve) {
        require(['@/components/tenance_list/tenance_list'], resolve)
      },
    },
    {
    	path: '/order-list',
      name: 'order-list',
      component: function (resolve) {
        require(['@/components/order-list/order-list'], resolve)
      }
    },
    {
    	path: '/uploadRecord',
      name: 'uploadRecord',
      component: function (resolve) {
        require(['@/components/uploadRecord/uploadRecord'], resolve)
      },
    },
    {
      path: '/cart',
      name: 'cart',
      component: function (resolve) {
        require(['@/components/cart/Cart'], resolve)
      },
    },
    {
      path: '/user',
      name: 'user',
      component: function (resolve) {
        require(['@/components/user/User'], resolve)
      },
    },
    {
      path: '/userInfo',
      name: 'userInfo',
      component: function (resolve) {
        require(['@/components/user/Info'], resolve)
      },
    },

    {
      path: '/orderdetail',
      name: 'orderdetail',
      component: function (resolve) {
        require(['@/components/user/OrderDetail'], resolve)
      },
    },
    {
      path: '/addlist',
      name: 'addlist',
      component: function (resolve) {
        require(['@/components/address/AddressList'], resolve)
      },
    },
    {
      path: '/address',
      name: 'address',
      component: function (resolve) {
        require(['@/components/address/AddressItem'], resolve)
      },
    },
    {
      path: '/refund',
      name: 'refund',
      component: function (resolve) {
        require(['@/components/product/Refund'], resolve)
      },
    },
    {
      path: '/ship',
      name: 'ship',
      component: function (resolve) {
        require(['@/components/user/Ship'], resolve)
      },
    },
    {
      path: '/oemproduct',
      name: 'oemproduct',
      component: function (resolve) {
        require(['@/components/product/OemProduct'], resolve)
      },
    },







  ]
})
